home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
menus
/
mxmnu241.zip
/
UTILS.INC
< prev
next >
Wrap
Text File
|
1993-01-26
|
11KB
|
543 lines
Comment
==========================================================
This include file contains a lot of useful utilities. It is
smart enough to present the netware choices only if connected
to a novell network.
=========================================================
EndComment
;----- Create Variables
Var
PrintQueueChoices
PortChoices
MyServer
AllUsers
NetAddress
Station
UserName
BMess
TitleBackColor
TitleInsideColor
PersonalMenu
FilePicked
NovCon
;=============[ Util Menu ]============*
:Util
if NetworkVersion then NovCon = NovConnection <> 0
;----- Port Choices
Dispose(PortChoices)
AppendArray(PortChoices,'Lpt1')
AppendArray(PortChoices,'Lpt2')
AppendArray(PortChoices,'Lpt3')
AddChoice('Format Disk Menu',1)
AddChoice('Dos Functions',2)
if NovCon
AddChoice('Printer Select',3)
AddChoice('Novell Information',4)
AddChoice('Novell User Options',5)
if NovConsoleOperator
AddChoice('Novell Utilities',6)
AddChoice('Maintainence',7)
AddChoice('Menu Utilities',8)
AddChoice('Command Line',9)
endif
endif
if not NovCon
AddChoice('Menu Utilities',8)
AddChoice('Command Line',9)
endif
CornerStretchBox ('Utility Menu',43,6)
OnKey Task(1)
|SelectFormat
|LastKey = ' '
OnKey Task(2)
^Dos
OnKey Task(3)
|SelectPrintQueue
|Dispose Choices
|LastKey = ' '
OnKey Task(4)
^NovInfo
OnKey Task(5)
^NovUser
OnKey Task(6)
^NovUtils
OnKey Task(7)
^Maint
OnKey Task(8)
^MenuUtil
OnKey Task(9)
|if ExistOnPath('DOLIST.EXE') > ''
DropTo DoList
|else
| Bat 'DropTo ' + ReadEnv('COMSPEC')
|endif
;=============[ Dos Menu ]============*
:Dos
AddChoice('Directory Master',1)
AddChoice('Pick Directory',2)
AddChoice('Show Directory',3)
AddChoice('Free Space',4)
AddChoice('Memory Map',5)
AddChoice('Device Drivers',6)
CenterStretchBox ('DOS Menu',38,15)
OnKey Task(1)
|if NovConsoleOperator
DropTo DM3
|else
DropTo DMLITE
|endif
OnKey Task(2)
PD
OnKey Task(3)
D/W
OnKey Task(4)
Free
Pause
OnKey Task(5)
RamMap
Pause
OnKey Task(6)
Device
Pause
;=============[ Maintenence Menu ]============*
:Maint
AddChoice('Tape Backup',1)
AddChoice('Delete *.BAK Files',2)
AddChoice('Delete *.MRX Files',3)
CenterStretchBox ('Maintenence Menu',38,15)
OnKey Task(1)
|Error('Put Code for your Tape Backup Software here.')
OnKey Task(2)
Whereis *.BAK /D
OnKey Task(3)
Whereis *.MRX /D
;=============[ Menu Utilities Menu ]============*
:MenuUtil
AddChoice('Edit this Menu',1)
AddChoice('View Include Files',2)
AddChoice('Edit Include Files',3)
AddChoice('View a Menu File',4)
AddChoice('Edit a Menu File',5)
AddChoice('Run a Menu',6)
AddChoice('Load MarxHelp',7)
AddChoice('UnLoad MarxHelp',8)
CenterStretchBox ('Menu Utilities',38,15)
OnKey Task(1)
ME %MenuFileName
OnKey Task(2)
|FilePicked = PickAFile('*.INC','Include Files')
|ViewFile(FilePicked)
OnKey Task(3)
|FilePicked = GetIncludeFile
|if FilePicked > ''
| Bat 'ME ' + FilePicked
|endif
OnKey Task(4)
|FilePicked = PickAFile ('*.MNU','Menus')
|ViewFile(FilePicked)
OnKey Task(5)
|FilePicked = PickAFile ('*.MNU','Menus')
|if FilePicked > ''
| Bat 'ME ' + FilePicked
|endif
OnKey Task(6)
|FilePicked = PickAFile ('*.MNU','Menus')
|if FilePicked > ''
| Bat 'MARX ' + FilePicked
|endif
OnKey Task(7)
|MxCmd = 'MarxHelp'
OnKey Task(8)
|MxCmd = 'MarxHelp /U'
;=============[ Format Menu ]============*
Procedure SelectFormat
var Ch Message Option
DrawTheBox(20,12,42,4 + HeightDifference,'Format Floppy Disk Menu')
Writeln ' 1 - Format 360 5 - Format /S 360'
Writeln ' 2 - Format 1.2M 6 - Format /S 1.2M'
Writeln ' 3 - Format 720 7 - Format /S 720'
Write ' 4 - Format 1.4M 8 - Format /S 1.4M'
Ch = ReadKey
if Ch = '1'
Message = '360k Format with no System Files.'
Option = '/4'
elseif Ch = '2'
Message = '1.2m Format with no System Files.'
Option = ''
elseif Ch = '3'
Message = '720k Format with no System Files.'
Option = '/N:9/T:80'
elseif Ch = '4'
Message = '1.4m Format with no System Files.'
Option = '/N:18/T:80'
elseif Ch = '5'
Message = '360k Format with System Files.'
Option = '/4/S'
elseif Ch = '6'
Message = '1.2m Format with System Files.'
Option = '/S'
elseif Ch = '7'
Message = '720k Format with System Files.'
Option = '/N:9/T:80/S'
elseif Ch = '8'
Message = '1.4m Format with System Files.'
Option = '/N:18/T:80/S'
else
Return
endif
if DosVersionString >= '5.00'
Option = Option + '/U' ;unconditional
Option = Option + '/V:DOS' ;automatically adds volume label
endif
DrawTheBox(46,18,11,2 + HeightDifference,'Drive')
Writeln ' A:'
Write ' B:'
Ch = ReadKey
if Ch = Esc then Return
ExecFormat(Ch,Option,Message)
EndProc
;----- Execute FORMAT in a DOS Window
Procedure ExecFormat (Drv,Option,Message)
var FormatProg
FormatProg = ExistOnPath('FORMAT.EXE')
if FormatProg = '' then FormatProg = ExistOnPath('FORMAT.COM')
if FormatProg = ''
Error('FORMAT program not Found!')
Return
endif
BoxHeader = ' Formatting Drive ' + Drv + ': ' + Message + ' '
Shadow Off
DrawBox 1 4 80 21
Window 4 5 74 19
Writeln
ExecProg (FormatProg + ' ' + Drv + ': ' + Option)
EraseTopWindow
EndProc
;=============[ Novell Utilities Menu ]============*
:NovUtils
AddChoice('Session Management',1)
AddChoice('File Management',2)
AddChoice('Volume Information',3)
AddChoice('System Configuration',4)
AddChoice('File Server Monitoring',5)
AddChoice('Print Queue Management',6)
AddChoice('Print Job Configurations',7)
AddChoice('Printer Definitions',8)
AddChoice('Folio Help System',9)
CenterStretchBox ('Novell Utilities',38,15)
OnKey Task(1)
Session
OnKey Task(2)
Filer
OnKey Task(3)
VolInfo
OnKey Task(4)
Syscon
OnKey Task(5)
FConsole
OnKey Task(6)
PConsole
OnKey Task(7)
PrintCon
OnKey Task(8)
PrintDef
OnKey Task(9)
P:Help
;=============[ Novell Information Menu ]============*
:NovInfo
AddChoice('UserList',1)
AddChoice('Drive Map',2)
AddChoice('Current Dir',3)
AddChoice('Directory Rights',4)
AddChoice('List Servers',5)
AddChoice('Who Am I?',6)
AddChoice('Trustees',7)
AddChoice('System Time',8)
AddChoice('ChkVol',9)
AddChoice('Printer Status',10)
CenterStretchBox ('Novell Information',38,15)
OnKey Task(1)
UserList/A
Echo.
Pause
OnKey Task(2)
Map
Echo.
Pause
OnKey Task(3)
NDir
Pause
OnKey Task(4)
Rights
Echo.
Pause
OnKey Task(5)
SList
Echo.
Pause
OnKey Task(6)
WhoAmI/A
Echo.
Pause
OnKey Task(7)
TList
Echo.
Pause
OnKey Task(8)
SysTime
Echo.
Pause
OnKey Task(9)
ChkVol
Echo.
Pause
OnKey Task(10)
Capture Show
Echo.
Pause
;=============[ Novell User Menu ]============*
:NovUser
AddChoice('Change Password',1)
AddChoice('Block Messages',2)
AddChoice('Receive Messages',3)
AddChoice('End Printer Capture',4)
AddChoice('Send a Message',5)
CenterStretchBox ('Novell User Menu',38,15)
OnKey Task(1)
SetPass
OnKey Task(2)
CastOff
OnKey Task(3)
CastOn
OnKey Task(4)
EndCap
OnKey Task(5)
|SendMessage
;----- This routines selects a print queue
Procedure SelectPrintQueue
var Queue PrnPort QCmd LocalName
LocalName = '<Local Printer>'
if NumberOfElements(PrintQueueChoices) = 0
NovMyPrintQueues(PrintQueueChoices)
SortArray(PrintQueueChoices)
AppendArray(PrintQueueChoices,LocalName)
endif
Choices = PrintQueueChoices
DrawTheBox(28,11,23,Min(12,NumberOfElements(Choices) + HeightDifference